//
//  DVSicknessJointModel.m
//  QuickCure
//
//  Created by 松鼠君 on 9/14/16.
//  Copyright © 2016 haoge. All rights reserved.
//

#import "DVSicknessJointModel.h"

@implementation DVSicknessJointModel
//构建模型的init方法
-(instancetype)initWithDictionary:(NSDictionary *)dic{
    
    
    if(self = [super init]){
        
        
        [self setValuesForKeysWithDictionary:dic];
        
    }
    
    return self;
}

//构建模型的类方法

+(instancetype)sicknessJointWithDictionary:(NSDictionary *)dic{
    
    
    return [[self alloc] initWithDictionary:dic];
    
    
    
}


//转模型
+(NSArray*)sicknessJointWithFile:(NSString*)file{
    
    NSArray* arr = [NSArray arrayWithContentsOfFile:file];
    
    NSMutableArray * arr1 = [NSMutableArray array];
    
    for (NSDictionary*  dic  in arr) {
        
        [arr1 addObject:[[self alloc]initWithDictionary:dic] ];
        
        
    }
    return arr1;
}
@end
